Re: [GENERAL] alter table ? - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] alter table ?
Date
Msg-id l03110704b2747312d041@[147.233.159.109]
Whole thread Raw
In response to Re: [GENERAL] alter table ?  (Kevin Heflin <kheflin@shreve.net>)
Responses Re: [GENERAL] alter table ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-general
At 12:18 +0200 on 13/11/98, Kevin Heflin wrote:


> Yea, I did that, but I guess what I'm looking for, was that when ever
> anything was added to the table. Regardless of whether or not the
> spamblock was specified, it would be set to 'TRUE'

I guess adding constraints in alter statement is something to be placed in
Postgres's todo list if it is not there already.

But personally, I prefer doing this with "definition file" - SQL files
which define all the tables in my database.

In case of alteration, I dump all my tables and sequences, re-run the
creation file (which drops all tables and redefines everything), and reload
the tables and sequences - possibly adding data within the dump files to
reflect the addition or removal of columns.

This way, you can always recreate your database, create a second mirror, a
production database, etc. - and you can fill the "definition file" with
comments which will help you understand what you meant a year afterwards.

It's a tradition I kept from the time we used Oracle in one of my former
jobs. I think it's a practice taught in basic Oracle training, but it's
good for any database (that supports SQL/DDL scripts).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: "Sergei Chernev"
Date:
Subject: RE: [GENERAL] PL/pgSQL
Next
From: "송기원"
Date:
Subject: how to use "text" type data